package com.bci.pwtz.mysql.model;

import java.util.Date;

import com.bci.pwtz.common.util.PwtzUtils;

public class BusinessOperateLog {
    private Long logId;

    private Long companyId;

    private Integer deviceTypeId;

    private Integer action;

    private String content;

    private Date createTime;
    
    private String createTimeStr;

    private Long operatorId;

    private String deviceId;
    
    private CompanyUser operator;
    
    private Company company;

    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Integer getDeviceTypeId() {
        return deviceTypeId;
    }

    public void setDeviceTypeId(Integer deviceTypeId) {
        this.deviceTypeId = deviceTypeId;
    }

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId == null ? null : deviceId.trim();
    }

    /**
     * @return the createTimeStr
     */
    public String getCreateTimeStr()
    {
        createTimeStr="";
        if(createTime!=null){
            createTimeStr = PwtzUtils.date2String(createTime,"yyyy-MM-dd HH:mm:ss");
        }
        return createTimeStr;
    }

    /**
     * @param createTimeStr the createTimeStr to set
     */
    public void setCreateTimeStr(String createTimeStr)
    {
        this.createTimeStr = createTimeStr;
    }

    /**
     * @return the operator
     */
    public CompanyUser getOperator()
    {
        return operator;
    }

    /**
     * @param operator the operator to set
     */
    public void setOperator(CompanyUser operator)
    {
        this.operator = operator;
    }

    /**
     * @return the company
     */
    public Company getCompany()
    {
        return company;
    }

    /**
     * @param company the company to set
     */
    public void setCompany(Company company)
    {
        this.company = company;
    }

    @Override
    public String toString()
    {
        return "BusinessOperateLog [logId=" + logId + ", companyId=" + companyId + ", deviceTypeId=" + deviceTypeId + ", action=" + action + ", content=" + content + ", createTime=" + createTime + ", operatorId=" + operatorId + ", deviceId=" + deviceId + "]";
    }
    
}